/* 
 * 公共表格样式文件
 * 用于统一项目中所有表格的样式，支持换肤功能
 */

/* CSS变量定义 - 支持换肤功能 */
:root {
  /* 表格主题色 - 使用全局主题变量 */
  --table-header-bg: var(--theme-table-header-bg);
  --table-header-color: var(--theme-table-header-color);
  --table-header-border: var(--theme-table-header-border);

  /* 表格行色 - 使用全局主题变量 */
  --table-row-bg: var(--theme-table-row-bg);
  --table-row-hover-bg: var(--theme-table-row-hover-bg);
  --table-row-stripe-bg: var(--theme-table-row-stripe-bg);
  --table-row-border: var(--theme-table-row-border);

  /* 表格文字色 - 使用全局主题变量 */
  --table-text-color: var(--theme-table-text-color);
  --table-text-hover-color: var(--theme-table-text-hover-color);

  /* 操作按钮色 - 使用全局主题变量 */
  --table-action-color: var(--theme-table-action-color);
  --table-action-hover-color: var(--theme-table-action-hover-color);
  --table-delete-color: var(--theme-danger);
  --table-delete-hover-color: var(--theme-danger-dark);
}

/* 表格容器样式 */
.common-table-container {
  width: 100%;
  overflow: auto;
  padding: 10px 0;
  background: var(--theme-bg-primary);
}

/* 表格包装器 */
.common-table-wrapper {
  height: 100%;
  overflow: auto;
  border: 1px solid var(--table-row-border);
  border-radius: 4px;
  background: var(--theme-bg-primary);
}

/* 统一表格样式 */
.common-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--theme-bg-primary);
  font-size: var(--font-size-base);
  border-radius: 4px;
  overflow: hidden;
}

/* 表头样式 */
.common-table thead {
  background-color: var(--table-header-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.common-table th {
  background-color: var(--table-header-bg) !important;
  color: var(--table-header-color) !important;

  padding: 12px 1px;
  border-right: 1px solid var(--table-header-border);
  border-bottom: 1px solid var(--table-row-border);
  font-size: var(--font-size-base);
}

.common-table th:first-child {
  border-top-left-radius: 4px;
}

.common-table th:last-child {
  border-right: none;
  border-top-right-radius: 4px;
}

/* 表体样式 */
.common-table tbody {
  background: var(--table-row-bg);
}

.common-table td {
  padding: 10px 1px;
  text-align: center;
  border-right: 1px solid var(--table-row-border);
  border-bottom: 1px solid var(--table-row-border);
  color: var(--table-text-color);
  font-size: var(--font-size-base);
}

.common-table td:last-child {
  border-right: none;
}

/* 表格行样式 */
.common-table tbody tr {
  background: var(--table-row-bg);
  transition: background-color 0.2s ease;
}


.common-table tbody tr:hover {
  background: var(--table-row-hover-bg);
  color: var(--table-text-hover-color);
}

/* 操作按钮样式 */
.common-table .action-btn {
  background: none;
  border: none;
  color: var(--table-action-color);
  cursor: pointer;
  margin: 0 2px;
  text-decoration: underline;
  padding: 2px 4px;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.common-table .action-btn:hover {
  color: var(--table-action-hover-color);
  background-color: rgba(74, 144, 226, 0.1);
}

.common-table .delete-btn {
  color: var(--table-delete-color);
}

.common-table .delete-btn:hover {
  color: var(--table-delete-hover-color);
  background-color: rgba(245, 108, 108, 0.1);
}

/* 状态按钮样式 */
.common-table .status-btn {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: var(--font-size-small);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.common-table .status-enabled {
  background-color: var(--theme-success);
  color: white;
}

.common-table .status-disabled {
  background-color: var(--theme-danger);
  color: white;
}

.common-table .status-disabled-login {
  background-color: var(--theme-info);
  color: white;
}

/* 表格加载状态 */
.common-table-loading {
  position: relative;
  min-height: 200px;
}

/* 空数据状态 */
.common-table-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--theme-text-secondary);
  font-size: var(--font-size-base);
}

.common-table-empty .empty-icon {
  font-size: 48px;
  color: var(--theme-text-placeholder);
  margin-bottom: 16px;
}

/* 分页样式 */
.common-table-pagination {
  padding: 20px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--table-row-border);
  background: var(--theme-bg-primary);
}

/* 表格工具栏样式 */
.common-table-toolbar {
  padding: 15px 20px;
  background: var(--theme-bg-secondary);
  border-bottom: 1px solid var(--table-row-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.common-table-toolbar .toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.common-table-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 表格筛选区域 */
.common-table-filter {
  padding: 15px 20px;
  background: var(--theme-bg-secondary);
  border-bottom: 1px solid var(--table-row-border);
}

.common-table-filter .filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.common-table-filter .filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.common-table-filter .filter-label {
  color: var(--theme-text-regular);
  font-weight: 500;
  font-size: var(--font-size-medium);
  white-space: nowrap;
}

/* 通用搜索条件区域样式 */
.search-section {
  margin-bottom: 20px;
  font-size: var(--font-size-base) !important;
}

.search-form {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  font-size: var(--font-size-base) !important;
}

.form_item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-base) !important;
}

.form_item .label {
  color: #333 !important;
  font-size: var(--font-size-base) !important;
  white-space: nowrap;
}

.form_item .input_box {
  display: flex;
  gap: 0;
  align-items: center;
}

.form_item .input {
  width: 150px;
}

.form_item .search-btn {
  height: 32px;
  font-size: var(--font-size-base) !important;
  background: #409eff;
  border-color: #409eff;
}

.form_item .search-btn:hover {
  background: #3a5998;
  border-color: #3a5998;
}

.el-dialog {
  margin: 5vh auto !important;
}

.el-dialog__body {
  max-height: 75vh;
  overflow: hidden;
  overflow-y: auto;
}

/* ==================== 弹窗内下拉框层级修复 ==================== */

/* 确保弹窗内的所有下拉组件都在正确的层级 */
.el-dialog .el-popper,
.el-dialog .el-select-dropdown,
.el-dialog .el-picker-panel,
.el-dialog .el-cascader-panel,
.el-dialog .el-tooltip__popper,
.el-dialog .el-popover {
  z-index: 3100 !important;
}

/* 修复Element Plus弹出组件的层级 */
.el-popper.is-pure {
  z-index: 3100 !important;
}

/* 确保下拉框选项在弹窗内可见 */
.el-select-dropdown.el-popper[data-popper-placement] {
  z-index: 3100 !important;
}

/* ==================== 通用页面布局样式 ==================== */

/* 页面容器 */
.common-page {
  background-color: #f5f7fa;
}

.common-page-content {
  height: 100%;
}

/* 卡片容器 */
.common-card {
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.common-card .el-card__body {
  padding: 20px;
  height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
}

/* ==================== 通用分页样式 ==================== */

/* 分页区域 */
.common-pagination-section {
  display: flex;
  justify-content: end;
  align-items: center;
  padding: 15px 20px;
 
}

.common-pagination .el-pagination {
  justify-content: center;
}

.common-pagination .el-pagination__total {
  color: #606266;
  font-size: var(--font-size-medium);
}

.common-pagination .el-pagination__sizes {
  margin-right: 10px;
}

.common-pagination .el-pagination__jump {
  margin-left: 10px;
  color: #606266;
  font-size: var(--font-size-medium);
}

.common-pagination .el-pager li {
  background-color: #fff;
  border: 1px solid #dcdfe6;
  color: #606266;
  font-size: var(--font-size-medium);
  min-width: 30px;
  height: 28px;
  line-height: 26px;
}

.common-pagination .el-pager li.active {
  background-color: #4a90e2;
  border-color: #4a90e2;
  color: #fff;
}

.common-pagination .el-pager li:hover {
  color: #4a90e2;
}

.common-pagination .btn-prev,
.common-pagination .btn-next {
  background-color: #fff;
  border: 1px solid #dcdfe6;
  color: #606266;
  font-size: var(--font-size-medium);
  min-width: 30px;
  height: 28px;
  line-height: 26px;
}

.common-pagination .btn-prev:hover,
.common-pagination .btn-next:hover {
  color: #4a90e2;
}



.tg_btm{
  background-color:  var(--theme-table-action-color);
  border: 0;
  padding: 2px 6px;
  color: #fff;
  margin-left: 10px;
  font-size: 13px;
  border-radius: 3px;
  cursor: pointer;
}

/* ==================== 通用空状态样式 ==================== */

/* 空状态页面 */
.common-empty-page {
  padding: 20px;
}

.common-page-header {
  margin-bottom: 20px;
}

.common-page-header h2 {
  color: #2c3e50;
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin: 0 0 8px 0;
}

.common-page-description {
  color: #606266;
  margin: 0;
  font-size: var(--font-size-base);
}

.common-empty-content {
  text-align: center;
  padding: 60px 20px;
}

.common-empty-icon {
  font-size: 48px;
  color: #c0c4cc;
  margin-bottom: 16px;
}

.common-empty-content h3 {
  color: #606266;
  font-size: var(--font-size-large);
  font-weight: 500;
  margin: 0 0 8px 0;
}

.common-empty-content p {
  color: #909399;
  font-size: var(--font-size-base);
  margin: 0;
  line-height: 1.5;
}

.el-button{
  border-radius: 3px !important;
}

/* ==================== 全局字体大小系统 ==================== */

/* 应用全局字体大小到body */
body {
  font-size: var(--font-size-base) !important;
}

/* Element Plus 组件字体大小覆盖 */
.el-button {
  font-size: var(--font-size-base) !important;
}

.el-input__inner {
  font-size: var(--font-size-base) !important;
}

.el-select .el-input__inner {
  font-size: var(--font-size-base) !important;
}

.el-form-item__label {
  font-size: var(--font-size-base) !important;
}

.el-table {
  font-size: var(--font-size-base) !important;
}

.el-table th {
  font-size: var(--font-size-base) !important;
}

.el-table td {
  font-size: var(--font-size-medium) !important;
}

.el-pagination {
  font-size: var(--font-size-medium) !important;
}

.el-menu-item {
  font-size: var(--font-size-base) !important;
}

.el-sub-menu__title {
  font-size: var(--font-size-base) !important;
}

.el-dialog__title {
  font-size: var(--font-size-large) !important;
}

.el-dialog__body {
  font-size: var(--font-size-base) !important;
}

.el-message {
  font-size: var(--font-size-base) !important;
}

.el-notification {
  font-size: var(--font-size-base) !important;
}

.el-tooltip__popper {
  font-size: var(--font-size-small) !important;
}

.el-dropdown-menu__item {
  font-size: var(--font-size-base) !important;
}

.el-tabs__item {
  font-size: var(--font-size-base) !important;
}

.el-card__header {
  font-size: var(--font-size-base) !important;
}

.el-card__body {
  font-size: var(--font-size-base) !important;
}

/* 搜索区域字体大小覆盖 */
.search-section,
.search-section * {
  font-size: var(--font-size-base) !important;
}

.search-form,
.search-form * {
  font-size: var(--font-size-base) !important;
}

.form_item,
.form_item * {
  font-size: var(--font-size-base) !important;
}

.form_item .label {
  font-size: var(--font-size-base) !important;
}

.form_item .search-btn {
  font-size: var(--font-size-base) !important;
}

.form_item .el-input__inner {
  font-size: var(--font-size-base) !important;
}

.form_item .el-select .el-input__inner {
  font-size: var(--font-size-base) !important;
}

.form_item .el-button {
  font-size: var(--font-size-base) !important;
}

/* 通用文本大小类 */
.text-small {
  font-size: var(--font-size-small) !important;
}

.text-medium {
  font-size: var(--font-size-medium) !important;
}

.text-base {
  font-size: var(--font-size-base) !important;
}

.text-large {
  font-size: var(--font-size-large) !important;
}

.text-xl {
  font-size: var(--font-size-xl) !important;
}

/* ==================== 搜索区域专用字体大小覆盖 ==================== */

/* 确保搜索区域的所有元素都使用字体大小变量 */
.search-section,
.search-section .search-form,
.search-section .form_item,
.search-section .form_item .label,
.search-section .form_item .el-form-item__label,
.search-section .form_item .el-input,
.search-section .form_item .el-input__inner,
.search-section .form_item .el-input__wrapper,
.search-section .form_item .el-select,
.search-section .form_item .el-select .el-input__inner,
.search-section .form_item .el-button,
.search-section .form_item .search-btn,
.search-section .form_item .el-date-editor,
.search-section .form_item .el-date-editor .el-input__inner,
.search-section .form_item .el-cascader,
.search-section .form_item .el-cascader .el-input__inner,
.search-section .form_item .el-autocomplete,
.search-section .form_item .el-autocomplete .el-input__inner,
.search-section .form_item .el-input-number,
.search-section .form_item .el-input-number .el-input__inner,
.search-section .form_item .el-textarea,
.search-section .form_item .el-textarea__inner {
  font-size: var(--font-size-base) !important;
}

/* 搜索区域下拉选项字体大小 */
.el-select-dropdown .el-select-dropdown__item,
.el-cascader-panel .el-cascader-node__label,
.el-date-picker .el-picker-panel__content,
.el-time-picker .el-time-panel__content {
  font-size: var(--font-size-base) !important;
}

/* 搜索区域表单验证信息字体大小 */
.search-section .el-form-item__error {
  font-size: var(--font-size-small) !important;
}

/* 搜索区域占位符文本字体大小 */
.search-section .el-input__inner::placeholder,
.search-section .el-textarea__inner::placeholder {
  font-size: var(--font-size-base) !important;
}

/* ==================== 统计页面共用样式 ==================== */

/* 统计表格汇总行样式 */
.dataTotal {
  background-color: var(--theme-bg-secondary);
  font-weight: bold;
}

.dataTotal td {
  color: #f00 !important;
}

/* 状态文字颜色样式 */
.red {
  color: #f00;
}

.pink {
  color: pink;
  text-decoration: line-through;
}

/* 可点击元素样式 */
.clickable {
  cursor: pointer;
}

.clickable:hover {
  text-decoration: underline;
}

/* 排行榜相关样式 */
.top_pm {
  text-align: center;
}

.images {
  width: 40px;
  height: 40px;
}

.tops {
  color: var(--theme-text-primary);
}

/* 负责人样式 */
.fzr {
  cursor: pointer;
}

.fzr.pink {
  color: pink;
  text-decoration: line-through;
}

.fzr.red {
  color: #f00;
}

/* 员工姓名样式 */
.realname {
  color: var(--table-header-bg);
}

/* 通用宽度样式 */
.w60px {
  width: 60px !important;
}

.w200 {
  width: 200px;
}

/* 表格列宽样式 */
.tw_2 { width: 80px; }
.tw_3 { width: 120px; }
.tw_4 { width: 100px; }
.tw_5 { width: 80px; }
.tw_6 {
  max-width: 400px;
  text-align: left !important;
}
.tw_7 { width: 100px; }
.tw_8 { width: 120px; }
.tw_9 { width: 150px; }

/* 客户列表特殊样式 */
.un-follow-info {
  background: #f5f7fa;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  font-size: var(--font-size-base);
  line-height: 1.6;
}

.un-follow-info .item {
  margin-right: 10px;
}

.un-follow-info .num {
  color: var(--table-header-bg);
  cursor: pointer;
  font-weight: bold;
  text-decoration: underline;
}


/* 备注相关样式 */
.jl_remark {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* 建立输入框样式 */
.establishing_input {
  margin-top: 8px;
  width: 80px !important;
}

.establishing_input .el-input__inner {
  font-size: 12px !important;
  text-align: center !important;
}

.el-button--text{
  color: var(--table-header-bg) !important;
}

.el-switch__label.is-active{
  color: var(--table-header-bg) !important;
}

.el-select-dropdown__item.is-selected{
  color: var(--table-header-bg) !important;
}

.el-select__wrapper.is-focused{
  box-shadow: 0 0 0 1px var(--table-header-bg) inset !important;
}